package com.jspgou.cms.entity.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the jc_aftersale table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="jc_aftersale"
 */

public abstract class BaseAftersale  implements Serializable {

	public static String REF = "Aftersale";
	public static String PROP_MEMBER = "member";
	public static String PROP_SALEADDITIONALWORDS = "saleadditionalwords";
	public static String PROP_DEMAND = "demand";
	public static String PROP_WEBSITE = "website";
	public static String PROP_STORE = "store";
	public static String PROP_PLATADDITIONALWORDS = "platadditionalwords";
	public static String PROP_TYPE = "type";
	public static String PROP_ORDER = "order";
	public static String PROP_INTERVENE = "intervene";
	public static String PROP_STATUS = "Status";
	public static String PROP_ADDITIONALWORDS = "Additionalwords";
	public static String PROP_REPLY_TIME = "replyTime";
	public static String PROP_ID = "Id";
	public static String PROP_REFUNDMONEY = "Refundmoney";
	public static String PROP_APPLY_TIME = "applyTime";


	// constructors
	public BaseAftersale () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseAftersale (java.lang.Long id) {
		this.setId(id);
		initialize();
	}

	/**
	 * Constructor for required fields
	 */
	public BaseAftersale (
		java.lang.Long id,
		com.jspgou.core.entity.Website website,
		com.jspgou.cms.entity.AftersaleType type,
		com.jspgou.cms.entity.AftersaleDemand demand,
		com.jspgou.cms.entity.Order order,
		com.jspgou.cms.entity.Store store,
		com.jspgou.cms.entity.ShopMember member,
		double refundmoney,
		java.util.Date applyTime,
		java.lang.Integer status,
		boolean intervene) {

		this.setId(id);
		this.setWebsite(website);
		this.setType(type);
		this.setDemand(demand);
		this.setOrder(order);
		this.setStore(store);
		this.setMember(member);
		this.setRefundmoney(refundmoney);
		this.setApplyTime(applyTime);
		this.setStatus(status);
		this.setIntervene(intervene);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Long id;

	// fields
	private double refundmoney;
	private java.util.Date applyTime;
	private java.util.Date replyTime;
	private java.lang.Integer status;
	private java.lang.String additionalwords;
	private java.lang.String saleadditionalwords;
	private java.lang.String platadditionalwords;
	private boolean intervene;

	// many to one
	private com.jspgou.core.entity.Website website;
	private com.jspgou.cms.entity.AftersaleType type;
	private com.jspgou.cms.entity.AftersaleDemand demand;
	private com.jspgou.cms.entity.Order order;
	private com.jspgou.cms.entity.Store store;
	private com.jspgou.cms.entity.ShopMember member;

	// collections
	private java.util.List<com.jspgou.cms.entity.AftersalePicture> pictures;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="native"
     *  column="aftersale_id"
     */
	public java.lang.Long getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 */
	public void setId (java.lang.Long id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: refundmoney
	 */
	public double getRefundmoney () {
		return refundmoney;
	}

	/**
	 * Set the value related to the column: refundmoney
	 * @param refundmoney the refundmoney value
	 */
	public void setRefundmoney (double refundmoney) {
		this.refundmoney = refundmoney;
	}


	/**
	 * Return the value associated with the column: applytime
	 */
	public java.util.Date getApplyTime () {
		return applyTime;
	}

	/**
	 * Set the value related to the column: applytime
	 * @param applyTime the applytime value
	 */
	public void setApplyTime (java.util.Date applyTime) {
		this.applyTime = applyTime;
	}


	/**
	 * Return the value associated with the column: replytime
	 */
	public java.util.Date getReplyTime () {
		return replyTime;
	}

	/**
	 * Set the value related to the column: replytime
	 * @param replyTime the replytime value
	 */
	public void setReplyTime (java.util.Date replyTime) {
		this.replyTime = replyTime;
	}


	/**
	 * Return the value associated with the column: status
	 */
	public java.lang.Integer getStatus () {
		return status;
	}

	/**
	 * Set the value related to the column: status
	 * @param status the status value
	 */
	public void setStatus (java.lang.Integer status) {
		this.status = status;
	}


	/**
	 * Return the value associated with the column: additionalwords
	 */
	public java.lang.String getAdditionalwords () {
		return additionalwords;
	}

	/**
	 * Set the value related to the column: additionalwords
	 * @param additionalwords the additionalwords value
	 */
	public void setAdditionalwords (java.lang.String additionalwords) {
		this.additionalwords = additionalwords;
	}


	/**
	 * Return the value associated with the column: saleadditionalwords
	 */
	public java.lang.String getSaleadditionalwords () {
		return saleadditionalwords;
	}

	/**
	 * Set the value related to the column: saleadditionalwords
	 * @param saleadditionalwords the saleadditionalwords value
	 */
	public void setSaleadditionalwords (java.lang.String saleadditionalwords) {
		this.saleadditionalwords = saleadditionalwords;
	}


	/**
	 * Return the value associated with the column: platadditionalwords
	 */
	public java.lang.String getPlatadditionalwords () {
		return platadditionalwords;
	}

	/**
	 * Set the value related to the column: platadditionalwords
	 * @param platadditionalwords the platadditionalwords value
	 */
	public void setPlatadditionalwords (java.lang.String platadditionalwords) {
		this.platadditionalwords = platadditionalwords;
	}


	/**
	 * Return the value associated with the column: is_intervene
	 */
	public boolean getIntervene () {
		return intervene;
	}

	/**
	 * Set the value related to the column: is_intervene
	 * @param intervene the is_intervene value
	 */
	public void setIntervene (boolean intervene) {
		this.intervene = intervene;
	}


	/**
	 * Return the value associated with the column: website_id
	 */
	public com.jspgou.core.entity.Website getWebsite () {
		return website;
	}

	/**
	 * Set the value related to the column: website_id
	 * @param website the website_id value
	 */
	public void setWebsite (com.jspgou.core.entity.Website website) {
		this.website = website;
	}


	/**
	 * Return the value associated with the column: type_id
	 */
	public com.jspgou.cms.entity.AftersaleType getType () {
		return type;
	}

	/**
	 * Set the value related to the column: type_id
	 * @param type the type_id value
	 */
	public void setType (com.jspgou.cms.entity.AftersaleType type) {
		this.type = type;
	}


	/**
	 * Return the value associated with the column: demand_id
	 */
	public com.jspgou.cms.entity.AftersaleDemand getDemand () {
		return demand;
	}

	/**
	 * Set the value related to the column: demand_id
	 * @param demand the demand_id value
	 */
	public void setDemand (com.jspgou.cms.entity.AftersaleDemand demand) {
		this.demand = demand;
	}


	/**
	 * Return the value associated with the column: order_id
	 */
	public com.jspgou.cms.entity.Order getOrder () {
		return order;
	}

	/**
	 * Set the value related to the column: order_id
	 * @param order the order_id value
	 */
	public void setOrder (com.jspgou.cms.entity.Order order) {
		this.order = order;
	}


	/**
	 * Return the value associated with the column: store_id
	 */
	public com.jspgou.cms.entity.Store getStore () {
		return store;
	}

	/**
	 * Set the value related to the column: store_id
	 * @param store the store_id value
	 */
	public void setStore (com.jspgou.cms.entity.Store store) {
		this.store = store;
	}


	/**
	 * Return the value associated with the column: member_id
	 */
	public com.jspgou.cms.entity.ShopMember getMember () {
		return member;
	}

	/**
	 * Set the value related to the column: member_id
	 * @param member the member_id value
	 */
	public void setMember (com.jspgou.cms.entity.ShopMember member) {
		this.member = member;
	}


	/**
	 * Return the value associated with the column: pictures
	 */
	public java.util.List<com.jspgou.cms.entity.AftersalePicture> getPictures () {
		return pictures;
	}

	/**
	 * Set the value related to the column: pictures
	 * @param pictures the pictures value
	 */
	public void setPictures (java.util.List<com.jspgou.cms.entity.AftersalePicture> pictures) {
		this.pictures = pictures;
	}



	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.jspgou.cms.entity.Aftersale)) return false;
		else {
			com.jspgou.cms.entity.Aftersale aftersale = (com.jspgou.cms.entity.Aftersale) obj;
			if (null == this.getId() || null == aftersale.getId()) return false;
			else return (this.getId().equals(aftersale.getId()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}